active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(X, sieve(Y))
FROM(mark(X)) → FROM(X)
TAIL(active(X)) → TAIL(X)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
FILTER(active(X1), X2) → FILTER(X1, X2)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
FROM(active(X)) → FROM(X)
SIEVE(mark(X)) → SIEVE(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
HEAD(mark(X)) → HEAD(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
MARK(true) → ACTIVE(true)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → CONS(Y, filter(X, sieve(Y)))
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(if(X1, X2, X3)) → MARK(X1)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(head(X)) → HEAD(mark(X))
ACTIVE(sieve(cons(X, Y))) → CONS(X, filter(X, sieve(Y)))
S(active(X)) → S(X)
MARK(filter(X1, X2)) → FILTER(mark(X1), mark(X2))
MARK(tail(X)) → TAIL(mark(X))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(false) → ACTIVE(false)
FILTER(X1, active(X2)) → FILTER(X1, X2)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
HEAD(active(X)) → HEAD(X)
FILTER(X1, mark(X2)) → FILTER(X1, X2)
TAIL(mark(X)) → TAIL(X)
CONS(active(X1), X2) → CONS(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
ACTIVE(primes) → S(0)
ACTIVE(from(X)) → FROM(s(X))
CONS(mark(X1), X2) → CONS(X1, X2)
MARK(primes) → ACTIVE(primes)
FILTER(mark(X1), X2) → FILTER(X1, X2)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(from(X)) → FROM(mark(X))
ACTIVE(sieve(cons(X, Y))) → FILTER(X, sieve(Y))
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(s(X)) → ACTIVE(s(mark(X)))
SIEVE(active(X)) → SIEVE(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → DIVIDES(s(s(X)), Y)
ACTIVE(primes) → SIEVE(from(s(s(0))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(s(s(X)), Z)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
MARK(divides(X1, X2)) → DIVIDES(mark(X1), mark(X2))
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
S(mark(X)) → S(X)
MARK(from(X)) → MARK(X)
MARK(s(X)) → S(mark(X))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
ACTIVE(primes) → FROM(s(s(0)))
ACTIVE(primes) → S(s(0))
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → SIEVE(Y)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(sieve(X)) → SIEVE(mark(X))
DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
ACTIVE(from(X)) → S(X)
ACTIVE(sieve(cons(X, Y))) → SIEVE(Y)
MARK(from(X)) → ACTIVE(from(mark(X)))
IF(X1, active(X2), X3) → IF(X1, X2, X3)
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(0) → ACTIVE(0)
MARK(sieve(X)) → MARK(X)
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(X, sieve(Y))
FROM(mark(X)) → FROM(X)
TAIL(active(X)) → TAIL(X)
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
FILTER(active(X1), X2) → FILTER(X1, X2)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
FROM(active(X)) → FROM(X)
SIEVE(mark(X)) → SIEVE(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
HEAD(mark(X)) → HEAD(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
MARK(true) → ACTIVE(true)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → CONS(Y, filter(X, sieve(Y)))
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(if(X1, X2, X3)) → MARK(X1)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(head(X)) → HEAD(mark(X))
ACTIVE(sieve(cons(X, Y))) → CONS(X, filter(X, sieve(Y)))
S(active(X)) → S(X)
MARK(filter(X1, X2)) → FILTER(mark(X1), mark(X2))
MARK(tail(X)) → TAIL(mark(X))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(false) → ACTIVE(false)
FILTER(X1, active(X2)) → FILTER(X1, X2)
MARK(tail(X)) → ACTIVE(tail(mark(X)))
HEAD(active(X)) → HEAD(X)
FILTER(X1, mark(X2)) → FILTER(X1, X2)
TAIL(mark(X)) → TAIL(X)
CONS(active(X1), X2) → CONS(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
ACTIVE(primes) → S(0)
ACTIVE(from(X)) → FROM(s(X))
CONS(mark(X1), X2) → CONS(X1, X2)
MARK(primes) → ACTIVE(primes)
FILTER(mark(X1), X2) → FILTER(X1, X2)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(from(X)) → FROM(mark(X))
ACTIVE(sieve(cons(X, Y))) → FILTER(X, sieve(Y))
CONS(X1, active(X2)) → CONS(X1, X2)
MARK(s(X)) → ACTIVE(s(mark(X)))
SIEVE(active(X)) → SIEVE(X)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → DIVIDES(s(s(X)), Y)
ACTIVE(primes) → SIEVE(from(s(s(0))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → FILTER(s(s(X)), Z)
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
MARK(divides(X1, X2)) → DIVIDES(mark(X1), mark(X2))
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
S(mark(X)) → S(X)
MARK(from(X)) → MARK(X)
MARK(s(X)) → S(mark(X))
MARK(if(X1, X2, X3)) → IF(mark(X1), X2, X3)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
ACTIVE(primes) → FROM(s(s(0)))
ACTIVE(primes) → S(s(0))
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → SIEVE(Y)
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(sieve(X)) → SIEVE(mark(X))
DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
ACTIVE(from(X)) → S(X)
ACTIVE(sieve(cons(X, Y))) → SIEVE(Y)
MARK(from(X)) → ACTIVE(from(mark(X)))
IF(X1, active(X2), X3) → IF(X1, X2, X3)
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(0) → ACTIVE(0)
MARK(sieve(X)) → MARK(X)
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
DIVIDES(active(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, active(X2)) → DIVIDES(X1, X2)
DIVIDES(mark(X1), X2) → DIVIDES(X1, X2)
DIVIDES(X1, mark(X2)) → DIVIDES(X1, X2)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
FILTER(mark(X1), X2) → FILTER(X1, X2)
FILTER(X1, active(X2)) → FILTER(X1, X2)
FILTER(active(X1), X2) → FILTER(X1, X2)
FILTER(X1, mark(X2)) → FILTER(X1, X2)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
FILTER(mark(X1), X2) → FILTER(X1, X2)
FILTER(X1, active(X2)) → FILTER(X1, X2)
FILTER(active(X1), X2) → FILTER(X1, X2)
FILTER(X1, mark(X2)) → FILTER(X1, X2)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
IF(X1, mark(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, active(X3)) → IF(X1, X2, X3)
IF(X1, active(X2), X3) → IF(X1, X2, X3)
IF(X1, X2, mark(X3)) → IF(X1, X2, X3)
IF(mark(X1), X2, X3) → IF(X1, X2, X3)
IF(active(X1), X2, X3) → IF(X1, X2, X3)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
HEAD(mark(X)) → HEAD(X)
HEAD(active(X)) → HEAD(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
↳ QDP
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
S(mark(X)) → S(X)
S(active(X)) → S(X)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
S(active(X)) → S(X)
S(mark(X)) → S(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
SIEVE(active(X)) → SIEVE(X)
SIEVE(mark(X)) → SIEVE(X)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
SIEVE(active(X)) → SIEVE(X)
SIEVE(mark(X)) → SIEVE(X)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
MARK(primes) → ACTIVE(primes)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(if(X1, X2, X3)) → MARK(X1)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(divides(X1, X2)) → ACTIVE(divides(mark(X1), mark(X2)))
Used ordering: Polynomial interpretation [25]:
MARK(primes) → ACTIVE(primes)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(if(X1, X2, X3)) → MARK(X1)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(from(X)) → MARK(X)
MARK(divides(X1, X2)) → MARK(X2)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
POL(0) = 0
POL(ACTIVE(x1)) = x1
POL(MARK(x1)) = 1
POL(active(x1)) = 0
POL(cons(x1, x2)) = 0
POL(divides(x1, x2)) = 0
POL(false) = 0
POL(filter(x1, x2)) = 1
POL(from(x1)) = 1
POL(head(x1)) = 1
POL(if(x1, x2, x3)) = 1
POL(mark(x1)) = 0
POL(primes) = 1
POL(s(x1)) = 0
POL(sieve(x1)) = 1
POL(tail(x1)) = 1
POL(true) = 0
head(active(X)) → head(X)
head(mark(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
from(active(X)) → from(X)
from(mark(X)) → from(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
MARK(primes) → ACTIVE(primes)
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(X)) → ACTIVE(sieve(mark(X)))
MARK(if(X1, X2, X3)) → MARK(X1)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(from(X)) → MARK(X)
MARK(divides(X1, X2)) → MARK(X2)
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(head(X)) → ACTIVE(head(mark(X)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(primes) → ACTIVE(primes)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(cons(X1, X2)) → MARK(X1)
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(from(X)) → MARK(X)
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(divides(X1, X2)) → MARK(X2)
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(if(X1, X2, X3)) → ACTIVE(if(mark(X1), X2, X3))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(if(false, X, Y)) → MARK(Y)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(from(X)) → MARK(X)
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(filter(X1, X2)) → ACTIVE(filter(mark(X1), mark(X2)))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(divides(X1, X2)) → MARK(X1)
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(sieve(X)) → MARK(X)
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(head(X)) → ACTIVE(head(mark(X)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(divides(X1, X2)) → MARK(X1)
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(sieve(X)) → MARK(X)
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(true)) → ACTIVE(head(active(true)))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(tail(X)) → ACTIVE(tail(mark(X)))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(primes) → ACTIVE(primes)
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(head(true)) → ACTIVE(head(active(true)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(tail(true)) → ACTIVE(tail(active(true)))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(sieve(X)) → MARK(X)
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(sieve(true)) → ACTIVE(sieve(active(true)))
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(true)) → ACTIVE(head(active(true)))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(sieve(true)) → ACTIVE(sieve(true))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(if(true, X, Y)) → MARK(X)
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(head(true)) → ACTIVE(head(active(true)))
MARK(sieve(true)) → ACTIVE(sieve(true))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(sieve(0)) → ACTIVE(sieve(active(0)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(head(true)) → ACTIVE(head(active(true)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(sieve(0)) → ACTIVE(sieve(0))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(sieve(X)) → MARK(X)
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(true)) → ACTIVE(head(active(true)))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(sieve(0)) → ACTIVE(sieve(0))
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(s(X)) → MARK(X)
MARK(filter(X1, X2)) → MARK(X2)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(sieve(false)) → ACTIVE(sieve(active(false)))
MARK(head(true)) → ACTIVE(head(active(true)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
MARK(sieve(false)) → ACTIVE(sieve(false))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(sieve(false)) → ACTIVE(sieve(false))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(sieve(X)) → MARK(X)
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(head(X)) → MARK(X)
MARK(tail(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(head(true)) → ACTIVE(head(active(true)))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
MARK(filter(y0, x1)) → ACTIVE(filter(mark(y0), x1))
MARK(sieve(sieve(x0))) → ACTIVE(sieve(active(sieve(mark(x0)))))
MARK(if(0, y1, y2)) → ACTIVE(if(active(0), y1, y2))
MARK(head(if(x0, x1, x2))) → ACTIVE(head(active(if(mark(x0), x1, x2))))
MARK(if(y0, active(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(sieve(x0))) → ACTIVE(tail(active(sieve(mark(x0)))))
MARK(head(primes)) → ACTIVE(head(active(primes)))
MARK(sieve(filter(x0, x1))) → ACTIVE(sieve(active(filter(mark(x0), mark(x1)))))
MARK(head(0)) → ACTIVE(head(active(0)))
MARK(head(tail(x0))) → ACTIVE(head(active(tail(mark(x0)))))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(head(cons(x0, x1))) → ACTIVE(head(active(cons(mark(x0), x1))))
MARK(sieve(x0)) → ACTIVE(sieve(x0))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(filter(true, y1)) → ACTIVE(filter(active(true), mark(y1)))
MARK(filter(y0, true)) → ACTIVE(filter(mark(y0), active(true)))
MARK(head(x0)) → ACTIVE(head(x0))
MARK(tail(filter(x0, x1))) → ACTIVE(tail(active(filter(mark(x0), mark(x1)))))
MARK(head(head(x0))) → ACTIVE(head(active(head(mark(x0)))))
MARK(head(false)) → ACTIVE(head(active(false)))
MARK(tail(head(x0))) → ACTIVE(tail(active(head(mark(x0)))))
MARK(if(sieve(x0), y1, y2)) → ACTIVE(if(active(sieve(mark(x0))), y1, y2))
MARK(filter(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
ACTIVE(sieve(cons(X, Y))) → MARK(cons(X, filter(X, sieve(Y))))
MARK(sieve(cons(x0, x1))) → ACTIVE(sieve(active(cons(mark(x0), x1))))
MARK(tail(false)) → ACTIVE(tail(active(false)))
MARK(filter(from(x0), y1)) → ACTIVE(filter(active(from(mark(x0))), mark(y1)))
MARK(filter(tail(x0), y1)) → ACTIVE(filter(active(tail(mark(x0))), mark(y1)))
MARK(tail(cons(x0, x1))) → ACTIVE(tail(active(cons(mark(x0), x1))))
MARK(tail(x0)) → ACTIVE(tail(x0))
MARK(filter(y0, cons(x0, x1))) → ACTIVE(filter(mark(y0), active(cons(mark(x0), x1))))
MARK(if(s(x0), y1, y2)) → ACTIVE(if(active(s(mark(x0))), y1, y2))
MARK(divides(X1, X2)) → MARK(X2)
MARK(filter(y0, sieve(x0))) → ACTIVE(filter(mark(y0), active(sieve(mark(x0)))))
MARK(divides(X1, X2)) → MARK(X1)
MARK(sieve(X)) → MARK(X)
MARK(head(sieve(x0))) → ACTIVE(head(active(sieve(mark(x0)))))
MARK(filter(y0, filter(x0, x1))) → ACTIVE(filter(mark(y0), active(filter(mark(x0), mark(x1)))))
ACTIVE(if(true, X, Y)) → MARK(X)
MARK(filter(x0, y1)) → ACTIVE(filter(x0, mark(y1)))
ACTIVE(tail(cons(X, Y))) → MARK(Y)
MARK(if(y0, x1, active(x2))) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(divides(x0, x1))) → ACTIVE(tail(active(divides(mark(x0), mark(x1)))))
MARK(filter(y0, from(x0))) → ACTIVE(filter(mark(y0), active(from(mark(x0)))))
MARK(tail(X)) → MARK(X)
MARK(head(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(tail(if(x0, x1, x2))) → ACTIVE(tail(active(if(mark(x0), x1, x2))))
MARK(if(y0, x1, mark(x2))) → ACTIVE(if(mark(y0), x1, x2))
ACTIVE(filter(s(s(X)), cons(Y, Z))) → MARK(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
MARK(head(divides(x0, x1))) → ACTIVE(head(active(divides(mark(x0), mark(x1)))))
MARK(sieve(if(x0, x1, x2))) → ACTIVE(sieve(active(if(mark(x0), x1, x2))))
MARK(filter(y0, tail(x0))) → ACTIVE(filter(mark(y0), active(tail(mark(x0)))))
MARK(sieve(s(x0))) → ACTIVE(sieve(active(s(mark(x0)))))
MARK(sieve(primes)) → ACTIVE(sieve(active(primes)))
MARK(filter(y0, if(x0, x1, x2))) → ACTIVE(filter(mark(y0), active(if(mark(x0), x1, x2))))
MARK(head(filter(x0, x1))) → ACTIVE(head(active(filter(mark(x0), mark(x1)))))
MARK(sieve(divides(x0, x1))) → ACTIVE(sieve(active(divides(mark(x0), mark(x1)))))
MARK(if(x0, x1, x2)) → ACTIVE(if(x0, x1, x2))
MARK(filter(sieve(x0), y1)) → ACTIVE(filter(active(sieve(mark(x0))), mark(y1)))
MARK(filter(y0, s(x0))) → ACTIVE(filter(mark(y0), active(s(mark(x0)))))
MARK(if(head(x0), y1, y2)) → ACTIVE(if(active(head(mark(x0))), y1, y2))
MARK(tail(s(x0))) → ACTIVE(tail(active(s(mark(x0)))))
MARK(if(y0, mark(x1), x2)) → ACTIVE(if(mark(y0), x1, x2))
MARK(tail(0)) → ACTIVE(tail(active(0)))
MARK(if(if(x0, x1, x2), y1, y2)) → ACTIVE(if(active(if(mark(x0), x1, x2)), y1, y2))
MARK(primes) → ACTIVE(primes)
MARK(tail(true)) → ACTIVE(tail(active(true)))
ACTIVE(if(false, X, Y)) → MARK(Y)
MARK(tail(primes)) → ACTIVE(tail(active(primes)))
MARK(if(primes, y1, y2)) → ACTIVE(if(active(primes), y1, y2))
MARK(if(true, y1, y2)) → ACTIVE(if(active(true), y1, y2))
MARK(filter(s(x0), y1)) → ACTIVE(filter(active(s(mark(x0))), mark(y1)))
MARK(if(tail(x0), y1, y2)) → ACTIVE(if(active(tail(mark(x0))), y1, y2))
MARK(sieve(tail(x0))) → ACTIVE(sieve(active(tail(mark(x0)))))
MARK(sieve(from(x0))) → ACTIVE(sieve(active(from(mark(x0)))))
MARK(filter(filter(x0, x1), y1)) → ACTIVE(filter(active(filter(mark(x0), mark(x1))), mark(y1)))
MARK(filter(0, y1)) → ACTIVE(filter(active(0), mark(y1)))
MARK(filter(y0, 0)) → ACTIVE(filter(mark(y0), active(0)))
MARK(if(filter(x0, x1), y1, y2)) → ACTIVE(if(active(filter(mark(x0), mark(x1))), y1, y2))
MARK(filter(head(x0), y1)) → ACTIVE(filter(active(head(mark(x0))), mark(y1)))
MARK(filter(divides(x0, x1), y1)) → ACTIVE(filter(active(divides(mark(x0), mark(x1))), mark(y1)))
MARK(from(X)) → MARK(X)
MARK(if(divides(x0, x1), y1, y2)) → ACTIVE(if(active(divides(mark(x0), mark(x1))), y1, y2))
MARK(head(from(x0))) → ACTIVE(head(active(from(mark(x0)))))
MARK(tail(tail(x0))) → ACTIVE(tail(active(tail(mark(x0)))))
MARK(if(cons(x0, x1), y1, y2)) → ACTIVE(if(active(cons(mark(x0), x1)), y1, y2))
MARK(head(true)) → ACTIVE(head(active(true)))
ACTIVE(primes) → MARK(sieve(from(s(s(0)))))
MARK(filter(X1, X2)) → MARK(X1)
MARK(head(s(x0))) → ACTIVE(head(active(s(mark(x0)))))
MARK(if(false, y1, y2)) → ACTIVE(if(active(false), y1, y2))
MARK(filter(y0, head(x0))) → ACTIVE(filter(mark(y0), active(head(mark(x0)))))
MARK(filter(if(x0, x1, x2), y1)) → ACTIVE(filter(active(if(mark(x0), x1, x2)), mark(y1)))
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(sieve(head(x0))) → ACTIVE(sieve(active(head(mark(x0)))))
ACTIVE(head(cons(X, Y))) → MARK(X)
MARK(tail(from(x0))) → ACTIVE(tail(active(from(mark(x0)))))
MARK(filter(y0, false)) → ACTIVE(filter(mark(y0), active(false)))
MARK(filter(false, y1)) → ACTIVE(filter(active(false), mark(y1)))
MARK(filter(primes, y1)) → ACTIVE(filter(active(primes), mark(y1)))
MARK(filter(y0, primes)) → ACTIVE(filter(mark(y0), active(primes)))
MARK(if(from(x0), y1, y2)) → ACTIVE(if(active(from(mark(x0))), y1, y2))
MARK(filter(y0, divides(x0, x1))) → ACTIVE(filter(mark(y0), active(divides(mark(x0), mark(x1)))))
MARK(filter(cons(x0, x1), y1)) → ACTIVE(filter(active(cons(mark(x0), x1)), mark(y1)))
active(primes) → mark(sieve(from(s(s(0)))))
active(from(X)) → mark(cons(X, from(s(X))))
active(head(cons(X, Y))) → mark(X)
active(tail(cons(X, Y))) → mark(Y)
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(filter(s(s(X)), cons(Y, Z))) → mark(if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y)))))
active(sieve(cons(X, Y))) → mark(cons(X, filter(X, sieve(Y))))
mark(primes) → active(primes)
mark(sieve(X)) → active(sieve(mark(X)))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
mark(0) → active(0)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(head(X)) → active(head(mark(X)))
mark(tail(X)) → active(tail(mark(X)))
mark(if(X1, X2, X3)) → active(if(mark(X1), X2, X3))
mark(true) → active(true)
mark(false) → active(false)
mark(filter(X1, X2)) → active(filter(mark(X1), mark(X2)))
mark(divides(X1, X2)) → active(divides(mark(X1), mark(X2)))
sieve(mark(X)) → sieve(X)
sieve(active(X)) → sieve(X)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
head(mark(X)) → head(X)
head(active(X)) → head(X)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
if(mark(X1), X2, X3) → if(X1, X2, X3)
if(X1, mark(X2), X3) → if(X1, X2, X3)
if(X1, X2, mark(X3)) → if(X1, X2, X3)
if(active(X1), X2, X3) → if(X1, X2, X3)
if(X1, active(X2), X3) → if(X1, X2, X3)
if(X1, X2, active(X3)) → if(X1, X2, X3)
filter(mark(X1), X2) → filter(X1, X2)
filter(X1, mark(X2)) → filter(X1, X2)
filter(active(X1), X2) → filter(X1, X2)
filter(X1, active(X2)) → filter(X1, X2)
divides(mark(X1), X2) → divides(X1, X2)
divides(X1, mark(X2)) → divides(X1, X2)
divides(active(X1), X2) → divides(X1, X2)
divides(X1, active(X2)) → divides(X1, X2)